#*******************************************************************
#* @ All Rights Reserved Copyright (C) 2015 broada,Co.,Ltd.        *
#*                                                                 *
#*  NOTE      = SAP系统协议分析
#*  DATE      =
#*******************************************************************

#共通参数
include         ../../../dist/dev/include/apmmodule/Makefile_comm.mk

INCLUDES        =  -I. -I$(LIB_I_APM_COMM) -I$(LIB_I_APM_MODULE) -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
LIBS            = -lzlog -lpthread -luuid
CFLAGS          = -fPIC

CFLAGS          += $(CFLAGS_EXT)
CFLAGS          += $(CFLAGS_UTEST)

LIBS            += $(LIBS_EXT)

include         $(APMMODULE)/Makefile_config.mk

MODULE_VERSION :=$(COMM_FRAMEWORK_VER).$(L7_VERSION)
TARGET_LIB_VER :=$(L7_NAME)_$(MODULE_VERSION).so

#SRC_LIB  = $(wildcard *.c)
#OBJS_LIB = $(patsubst %.c, %.o, $(SRC_LIB))
MODULE_SOURCE_FILES     := $(shell find . -path "./sap_decompress/epan" -prune -o -name "*.c*" -print | sed 's|./||')

all: prepare $(TARGET_LIB_VER)

.c.o:$(OBJS_LIB)
	$(CX) -c $(CFLAGS) $(INCLUDES)  $<

$(TARGET_LIB_VER): $(MODULE_SOURCE_FILES)
	$(CX) -shared $(CFLAGS) $(filter %.c %.cpp,$(MODULE_SOURCE_FILES)) $(LIB_A_APM_MODULE) $(LIB_A_APM_COMM) -o $@ $(INCLUDES) $(LIBS)
	rm -f *.o

include         $(APMMODULE)/Makefile_pre.mk

include         $(APMMODULE)/Makefile_dist.mk

#EOF

